/*
 * @Author: your name
 * @Date: 2020-12-21 16:20:14
 * @LastEditTime: 2020-12-24 09:10:16
 * @LastEditors: Please set LastEditors
 * @Description: 新建报表---柱状图报表
 * @FilePath: \gitee-WeBi\js\vue\mixins\addReportForm\zztRf.js
 */
(function(){
    /* test ---S */
    var dataAxis = ['点', '击', '柱', '子', '或', '者', '两', '指', '在', '触', '屏', '上', '滑', '动', '能', '够', '自', '动', '缩', '放'];
    var data = [220, 182, 191, 234, 290, 330, 310, 123, 442, 321, 90, 149, 210, 122, 133, 334, 198, 123, 125, 220];
    var yMax = 500;
    var dataShadow = [];
    
    for (var i = 0; i < data.length; i++) {
        dataShadow.push(yMax);
    }
    var option = {
        title: {
            /* text: '特性示例：渐变色 阴影 点击缩放',
            subtext: 'Feature Sample: Gradient Color, Shadow, Click Zoom' */
            text: '未命名图表',
            subtext: '---测试ing---',
            textStyle:{
                fontFamily:"DiaoSiPingFangSC"
            },
            subtextStyle:{
                fontFamily:"DiaoSiPingFangSC"
            }
        },
        xAxis: {
            data: dataAxis,
            axisLabel: {
                inside: true,
                fontFamily:"DiaoSiPingFangSC",
                textStyle: {
                    color: '#fff'
                }
            },
            axisTick: {
                show: false
            },
            axisLine: {
                show: false
            },
            z: 10
        },
        yAxis: {
            axisLine: {
                show: false
            },
            axisTick: {
                show: false
            },
            axisLabel: {
                fontFamily:"DiaoSiPingFangSC",
                textStyle: {
                    color: '#999'
                }
            }
        },
        dataZoom: [
            {
                type: 'inside'
            }
        ],
        series: [
            { // For shadow
                type: 'bar',
                itemStyle: {
                    color: 'rgba(0,0,0,0.05)'
                },
                barGap: '-100%',
                barCategoryGap: '40%',
                data: dataShadow,
                animation: false
            },
            {
                type: 'bar',
                itemStyle: {
                    color: new echarts.graphic.LinearGradient(
                        0, 0, 0, 1,
                        [
                            {offset: 0, color: '#83bff6'},
                            {offset: 0.5, color: '#188df0'},
                            {offset: 1, color: '#188df0'}
                        ]
                    )
                },
                emphasis: {
                    itemStyle: {
                        color: new echarts.graphic.LinearGradient(
                            0, 0, 0, 1,
                            [
                                {offset: 0, color: '#2378f7'},
                                {offset: 0.7, color: '#2378f7'},
                                {offset: 1, color: '#83bff6'}
                            ]
                        )
                    }
                },
                data: data
            }
        ]
    };
    
    /* test ---E */
    window.ARF_zzt_rf = {
        data(){
            return {
                // --- 柱状图表option数据
                zzt_options:option
            }
        },
        methods:{
            
        }
    };
})();

